翻訳と辞書
Words near each other
・ Tournament of Legends
・ Tournament of Minds
・ Tournament of Roses floats
・ Tournament of Roses Honor Band
・ Tournament of Roses Parade marching bands
・ Tournament of Roses Parade themes
・ Tournament of State Champions
・ Tournament of the Gardens Open
・ Tournament of the Gods
・ Tournament of the Towns
・ Tournament of Tottenham
・ Tournament Park
・ Tournament Players Championship (United Kingdom)
・ Tournament Players Club
・ Tournament selection
Tournament sort
・ Tournament Table
・ Tournament theory
・ Tournament – Play & Replay
・ Tournament.com
・ Tournan
・ Tournan, Gers
・ Tournan-en-Brie
・ Tournans
・ Tournavaux
・ Tournavista District
・ Tournay
・ Tournay Abbey
・ Tournay, Hautes-Pyrénées
・ Tournay-sur-Odon


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Tournament sort : ウィキペディア英語版
Tournament sort

Tournament sort is a sorting algorithm. It improves upon the naive selection sort by using a priority queue to find the next element in the sort. In the naive selection sort, it takes O(''n'') operations to select the next element of ''n'' elements; in a tournament sort, it takes O(log ''n'') operations (after building the initial tournament in O(''n'')). Tournament sort is a variation of heapsort.
== Common application ==
Tournament replacement selection sorts are used to gather the initial runs for external sorting algorithms. Conceptually, an external file is read and its elements are pushed into the priority queue until the queue is full. Then the minimum element is pulled from the queue and written as part of the first run. The next input element is read and pushed into the queue, and the min is selected again and added to the run. There's a small trick that if the new element being pushed into the queue is less than the last element added to the run, then the element's sort value is increased so it will be part of the next run. On average, a run will be 100% longer than the capacity of the priority queue.〔Donald Knuth, The Art of Computer Programming, Sorting and Searching, Volume 3, 1973. The "snowplow" argument. p. 254〕
Tournament sorts may also be used in N-way merges.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Tournament sort」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.